/**
 * 
 */
package edu.pku.sei.modeler.figures;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.Shape;
import org.eclipse.draw2d.XYLayout;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;

/**
 * @author YanYan
 *
 */
public class ExitpointPseudostateFigure extends CommonFigure {
	
	public static final org.eclipse.swt.graphics.Color INITIALNODE_COLOR = new Color(null,175,178,239);
	public IFigure root = null;
	
	private IFigure toolTip;
	
	public ExitpointPseudostateFigure(){
		super();
		
		XYLayout xyL = new XYLayout();
		setLayoutManager(xyL);
		setOpaque(true);
		
		root =  new CircleAndCross();
		root.setOpaque(true);
		root.setBackgroundColor(ColorConstants.buttonLightest);
		add(root);
		
		toolTip = new Label("ExitPoint");
		setToolTip(toolTip);
	}
	
	protected void paintFigure(Graphics g){
		super.paintFigure(g);
	}
	
	public void setBounds(Rectangle rect) {
		super.setBounds(rect);
		if (root != null){
			root.setSize(rect.width, rect.height);
		}
	}
	protected void paintShadow(Graphics g) {
		// TODO: draw the figure's own shadow here
	}
}


